# this is a python source program, with some more builtins.

AddOption("--release", action = "store_true", dest="release", default=False)
AddOption("--fastdebug", action = "store_true", dest="fastdebug", default=False)

if GetOption("release"):
	CXXFLAGS = '-Os'
elif GetOption("fastdebug"):
	CXXFLAGS = '-O1 -g'
else:
	CXXFLAGS = '-Wall -Wextra -g -std=c++98'


env = Environment(CXXFLAGS=CXXFLAGS, LIBS=['boost_filesystem', 'boost_system', 'boost_iostreams'])


common_objects = [env.Object(filename) for filename in Glob("*.c++")]

for dir_with_mains in ("test", "mains"):
	for program in Glob("%s/*.c++"%dir_with_mains):
		env.Program(program.get_path()[len(dir_with_mains)+1:-4], common_objects+env.Object(program, CPPPATH=["."]))
